package org.firefligher.xscript;

import java.util.HashMap;
import java.util.Map;

public class FunctionRegister {
	private Map<String, Function> functions;
	
	public FunctionRegister() {
		functions = new HashMap<String, Function>();
	}
	
	public boolean contains(String name) {
		return functions.containsKey(name);
	}
	
	public void addFunction(String name, Function f) {
		functions.put(name, f);
	}
	
	public Function getFunction(String name) {
		return functions.get(name);
	}
}
